package com.zmn.oms.services.interfaces.factory;

import com.zmn.oms.model.entity.factory.OrderFactory;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 类描述：厂商订单
 *
 * @author liuying
 * @date 2018/11/06 11:40
 */
public interface OrderFactoryService {

    /**
     * 根据工单id集合查询es工单所需集合
     *
     * @param orderIdList 定单id集合
     * @return es工单所需集合
     */
    List<OrderFactory> listEsOrderFactoryByOrderIdList(@Param("orderIdList") List<Long> orderIdList);

    /**
     * 通过订单Id获取信息
     *
     * @param orderId 订单id
     * @return 订单信息
     */
    OrderFactory findOrderFactoryByKey(Long orderId);

    /**
     * 修改订单
     *
     * @param orderFactory
     * @return
     */
    Integer updateOrderFactoryByKey(OrderFactory orderFactory);

    /**
     * 修改工单厂商的审核状态和审核版本号
     * @param fcOrderId
     * @return
     */
    Integer updateReviewByKey(Long fcOrderId);
    
    /**
     * 修改工单厂商的审核状态和审核版本号为默认值
     * @param orderFactory
     * @return
     */
    Integer updateReviewDefaultByKey(OrderFactory orderFactory);

    /**
     * 新增订单
     *
     * @param orderFactory
     * @return
     */
    Integer insertOrderFactory(OrderFactory orderFactory);

    /**
     * 更新订单
     * @param orderFactory
     * @return
     */
    int updateByKey(OrderFactory orderFactory);
}
